package com.mycar2w.cloud.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * created time 2017/4/1
 *
 * @author ljc
 * @version V1.0
 * 汽车基本参数表
 */
@Entity
@Table(name = "car_basic_parameter", schema = "mycar2wnew", catalog = "")
public class CarBasicParameter {
    private String manufacturer;
    private Long id;
    private String level;
    private String engine;
    private String transmissionCase;
    private String bodyStructure;
    private String lengthWidthHeight;
    private String wheelbase;
    private String cargoVolume;
    private String curbWeight;
    private Long carId;

    @Basic
    @Column(name = "manufacturer", nullable = true, length = 50)
    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    @Id
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "level", nullable = true, length = 50)
    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    @Basic
    @Column(name = "engine", nullable = true, length = 50)
    public String getEngine() {
        return engine;
    }

    public void setEngine(String engine) {
        this.engine = engine;
    }

    @Basic
    @Column(name = "transmission_case", nullable = true, length = 50)
    public String getTransmissionCase() {
        return transmissionCase;
    }

    public void setTransmissionCase(String transmissionCase) {
        this.transmissionCase = transmissionCase;
    }

    @Basic
    @Column(name = "body_structure", nullable = true, length = 50)
    public String getBodyStructure() {
        return bodyStructure;
    }

    public void setBodyStructure(String bodyStructure) {
        this.bodyStructure = bodyStructure;
    }

    @Basic
    @Column(name = "length_width_height", nullable = true, length = 50)
    public String getLengthWidthHeight() {
        return lengthWidthHeight;
    }

    public void setLengthWidthHeight(String lengthWidthHeight) {
        this.lengthWidthHeight = lengthWidthHeight;
    }

    @Basic
    @Column(name = "wheelbase", nullable = true, length = 50)
    public String getWheelbase() {
        return wheelbase;
    }

    public void setWheelbase(String wheelbase) {
        this.wheelbase = wheelbase;
    }

    @Basic
    @Column(name = "cargo_volume", nullable = true, length = 50)
    public String getCargoVolume() {
        return cargoVolume;
    }

    public void setCargoVolume(String cargoVolume) {
        this.cargoVolume = cargoVolume;
    }

    @Basic
    @Column(name = "curb_weight", nullable = true, length = 50)
    public String getCurbWeight() {
        return curbWeight;
    }

    public void setCurbWeight(String curbWeight) {
        this.curbWeight = curbWeight;
    }

    @Basic
    @Column(name = "car_id", nullable = true)
    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CarBasicParameter that = (CarBasicParameter) o;

        if (manufacturer != null ? !manufacturer.equals(that.manufacturer) : that.manufacturer != null) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (level != null ? !level.equals(that.level) : that.level != null) return false;
        if (engine != null ? !engine.equals(that.engine) : that.engine != null) return false;
        if (transmissionCase != null ? !transmissionCase.equals(that.transmissionCase) : that.transmissionCase != null)
            return false;
        if (bodyStructure != null ? !bodyStructure.equals(that.bodyStructure) : that.bodyStructure != null)
            return false;
        if (lengthWidthHeight != null ? !lengthWidthHeight.equals(that.lengthWidthHeight) : that.lengthWidthHeight != null)
            return false;
        if (wheelbase != null ? !wheelbase.equals(that.wheelbase) : that.wheelbase != null) return false;
        if (cargoVolume != null ? !cargoVolume.equals(that.cargoVolume) : that.cargoVolume != null) return false;
        if (curbWeight != null ? !curbWeight.equals(that.curbWeight) : that.curbWeight != null) return false;
        if (carId != null ? !carId.equals(that.carId) : that.carId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = manufacturer != null ? manufacturer.hashCode() : 0;
        result = 31 * result + (id != null ? id.hashCode() : 0);
        result = 31 * result + (level != null ? level.hashCode() : 0);
        result = 31 * result + (engine != null ? engine.hashCode() : 0);
        result = 31 * result + (transmissionCase != null ? transmissionCase.hashCode() : 0);
        result = 31 * result + (bodyStructure != null ? bodyStructure.hashCode() : 0);
        result = 31 * result + (lengthWidthHeight != null ? lengthWidthHeight.hashCode() : 0);
        result = 31 * result + (wheelbase != null ? wheelbase.hashCode() : 0);
        result = 31 * result + (cargoVolume != null ? cargoVolume.hashCode() : 0);
        result = 31 * result + (curbWeight != null ? curbWeight.hashCode() : 0);
        result = 31 * result + (carId != null ? carId.hashCode() : 0);
        return result;
    }
}
